package com.rapiddevsample;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.v.rapiddev.base.AppManager;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends BaseActivity {
    @Bind(R.id.networksample)
    Button networksample;
    @Bind(R.id.more)
    Button more;
    @Bind(R.id.pullToRefresh)
    Button pullToRefresh;

    @Override
    public void init() {
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

    @Override
    public void resume() {

    }

    @Override
    public void destroy() {
        AppManager.getAppManager().finishActivity(this);
    }

    @OnClick({R.id.networksample, R.id.more, R.id.pullToRefresh})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.networksample:
                startActivity(new Intent(MainActivity.this, HttpDemo.class));
                break;
            case R.id.more:
                startActivity(new Intent(MainActivity.this, ViewPagerAndImageSerlectorAndCompressSimpleDemo.class));
                break;
            case R.id.pullToRefresh:
                startActivity(new Intent(MainActivity.this, PullToRefreshSc.class));
                break;
        }
    }
}
